package main

type Database struct {
	ip       string
	port     string
	db       string
	user     string
	password string
	dataid   string
}

func getUrl(db *Database) string {
	if len(db.ip) != 0 && len(db.port) != 0 && len(db.db) != 0 && len(db.user) != 0 && len(db.password) != 0 {
		return db.user + ":" + db.password + "@tcp(" + db.ip + ":" + db.port + ")/" + db.db
	}
	return ""
}
